package com.xiaoming.api.service;


import com.xiaoming.api.MemberService;
import com.xiaoming.base.BaseApiService;
import com.xiaoming.base.BaseRedisService;
import com.xiaoming.base.ResponseBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author xiaoming
 * @Date 2020/3/10
 * @blame xiaoming
 */
@RestController
@RequestMapping("/member")
public class MemberServiceImpl extends BaseApiService implements MemberService {


    @Override
    public Map<String, Object> testRest() {
        Map<String, Object> result = new HashMap<>(2);
        result.put("errorCode", "200");
        result.put("errorMsg", "success");
        return result;

    }

    @Override
    public ResponseBase testRestResp() {
        return setResultSuccess();
    }

    @Override
    public ResponseBase testRedis(String key, String value) {
        baseRedisService.setString(key, value, null);
        return setResultSuccess();
    }
}
